-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/block priofees #274
Conversation
855844f
to
d705b6e
Compare
d705b6e
to
5c73513
Compare
}; | ||
prio_fees_in_block.sort_by(|a, b| a.0.cmp(&b.0)); | ||
|
||
let median_index = prio_fees_in_block.len() / 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The priority fees should be done by CU and transaction count.
the url is a testnet cluster, the comment says mainnet, please clarify |
when i just tried to connect i wasn't able to open a websocket connection to the staging deployment
|
Tried to invoke via regular http rpc request and had no success either, just got a very generic response: |
let mut agg: u64 = 0; | ||
for (prio, cu) in prio_fees_in_block { | ||
agg += cu; | ||
for p in (0..=100).step_by(5) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This algorithm is suboptimal, it is O(M*N) complex which can be converted to O(M) + O(N) by creating an array of increasing CU after executing the transaction and then in another pass comparing with percentage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
This reverts commit ff17d94.
Local testing
use this logging settings:
tested against mainnet:
http://mango.rpcpool.com/.....
Request:
Response:
Websocket: